package com.evil.common.application.dto.robot.rule;

import com.evil.common.application.dto.SourceDTO;
import com.evil.common.application.enums.robot.RobotRuleSourceTypeEnum;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * 机器人规则实体
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class RobotRuleSourceDTO extends SourceDTO {

    public RobotRuleSourceDTO(@NotNull(message = "源类型不能为空") Integer sourceType, @NotNull(message = "源id不能为空") Long sourceId) {
        super(sourceType, sourceId);
    }

    public RobotRuleSourceDTO(RobotRuleSourceTypeEnum sourceTypeEnum, @NotNull(message = "源id不能为空") Long sourceId) {
        super(sourceTypeEnum.getId(), sourceId);
    }
}
